package com.ja.openchat.ui.chat.multimsg;

import android.content.Context;

import com.zy.openchat.core.model.message.ChatInfo;
import com.zy.openchat.core.model.message.UiMessage;
import com.ja.openchat.ui.chat.ConversationFragment;

import java.util.List;

public abstract class MultiMessageAction {
    protected ChatInfo conversation;
    protected ConversationFragment fragment;

    public MultiMessageAction() {
    }

    public final void onBind(ConversationFragment fragment, ChatInfo conversation) {
        this.fragment = fragment;
        this.conversation = conversation;

    }

    public abstract void onClick(List<UiMessage> messages);

    public int priority() {
        return 0;
    }

    public boolean confirm() {
        return false;
    }

    public boolean filter(ChatInfo conversation) {
        return false;
    }

    public abstract int iconResId();

    public abstract String title(Context context);

    public String confirmPrompt(Context context) {
        return "";
    }


    public boolean checkActionEnable(List<UiMessage> checkedMessages){
        return checkedMessages!=null&&checkedMessages.size()>0;
    }
}
